package sa.huang;

import org.oasis_open.docs.wsbpel._2_0.process._abstract.*;

public class Test{
	public static void main(String[] args) {
		
		Data data = new Data();
		
		TopologyHandler topologyHandler = new TopologyHandler();
		
		topologyHandler.analyzeParticipants(data);
		topologyHandler.analyzeParticipantTypes(data);
		topologyHandler.analyzeMessageLinksInTopology(data);
		topologyHandler.getTNS(data);
		
		  topologyHandler.showResult(data);
		
		GroundingHandler groundingHandler = new GroundingHandler();
		
		groundingHandler.analyzeMessageLinksInGrounding(data);
		groundingHandler.analyzePropertiesInGrounding(data);
		
		
		PBDHandler pBDHandler = new PBDHandler();
		TProcess tPAirline = pBDHandler.loadProcess("src/main/resources/BPEL4Chor/travelExample/airline.bpel");
		pBDHandler.modifyConstruct(tPAirline, data);
		pBDHandler.writeProcess(tPAirline, "src/test/resources/generated-BPEL/test_airline.bpel");
		
		TProcess tPAgency = pBDHandler.loadProcess("src/main/resources/BPEL4Chor/travelExample/agency.bpel");
		pBDHandler.modifyConstruct(tPAgency, data);
		pBDHandler.writeProcess(tPAgency, "src/test/resources/generated-BPEL/test_agency.bpel");
		
		WSDLHandler wsdlHandler = new WSDLHandler();
		wsdlHandler.declarePartnerLinkTypes(data);
		
	}
	

}
